<!doctype html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">

<html>
<head>
<div th:replace="/console/layout :: head('文库列表','','')"></div>
<script th:src="@{/assets/js/jquery.bootgrid.js}"></script>
<script th:src="@{/assets/js/page.list.js}"></script>
</head>
<body>
	<div th:replace="/console/layout :: header"></div>

	<div th:replace="/console/layout :: sidebar('document_list')"></div>

	<div id="page_content">
		<div id="page_content_inner">

			<ul class="uk-breadcrumb">
				<li><a href="javascript:;">文库管理</a></li>
				<li><span>文库列表</span></li>
			</ul>

			<div class="uk-margin-small">
				<div class="uk-button-group">
					<a th:href="@{/console/document/add}" class="uk-button uk-button-primary uk-button-small">添加</a> <a
						id="delete-button" class="uk-button uk-button-danger uk-button-small">删除</a> <a
						class="uk-button uk-button-secondary uk-button-small" id="refresh-button">刷新</a>
				</div>
			</div>

			<form id="search-form" class="form-search">
				<select class="uk-select">
					<option> -- 无 -- </option>
					<option value="title">标题</option>
					<option value="summary">摘要</option>
				</select>
				<div>
					<div class="uk-search uk-search-default">
						<a href="javascript:;" class="uk-search-icon-flip" uk-search-icon></a> <input class="uk-search-input"
							type="search" placeholder="搜索">
					</div>
				</div>
			</form>

			<div class="uk-overflow-auto">
				<table id="main_table"
					class="uk-table uk-table-middle uk-table-small uk-table-hover uk-table-divider uk-table-condensed">
					<thead>
						<tr>
							<th data-column-id="id" data-header-css-class="uk-width-1-10" data-type="numeric" data-identifier="true"
								data-visible="false">ID</th>
							<th data-column-id="title" data-formatter="title">标题</th>
							<th data-column-id="createdDate" data-converter="datetime" data-css-class="datetime-column">创建时间</th>
							<th data-column-id="lastModifiedDate" data-converter="datetime" data-css-class="datetime-column">最后修改时间</th>
							<th data-formatter="commands" data-sortable="false" data-css-class="command-column">操作</th>
						</tr>
					</thead>
				</table>
			</div>
		</div>
	</div>

	<div th:replace="/console/layout :: footer"></div>

	<script type="text/javascript" th:inline="javascript">
		var base = /*[[${#httpServletRequest.getContextPath()}]]*/"";
	</script>
	<script type="text/javascript">
		$(function() {
			$("#page_content_inner").pagelist({
				baseUrl : base + "/console/document",
				formatters : {
					"title" : function(column, row) {
						return "<a href=\""+base+"/doc/"+row.id+"\" target=\"_blank\">" + row.title + "</a>";
					}
				}
			});
		});
	</script>
</body>
</html>
